[DEPRECATED] Create a new version of a Registered Model
DEPRECATED: This endpoint is deprecated as of version 6.2.1. Please migrate to POST /api/registeredmodels/v2 for enhanced functionality.
curl --request POST \
--url https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"artifact": "LogisticRegression",
"description": "Logistic regression model version 2",
"experimentRunId": "a8ea375c781d4b9c8e58469f0ad738f8"
}
'import requests
url = "https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions"
payload = {
"artifact": "LogisticRegression",
"description": "Logistic regression model version 2",
"experimentRunId": "a8ea375c781d4b9c8e58469f0ad738f8"
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
artifact: 'LogisticRegression',
description: 'Logistic regression model version 2',
experimentRunId: 'a8ea375c781d4b9c8e58469f0ad738f8'
})
};
fetch('https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'artifact' => 'LogisticRegression',
'description' => 'Logistic regression model version 2',
'experimentRunId' => 'a8ea375c781d4b9c8e58469f0ad738f8'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions"
payload := strings.NewReader("{\n \"artifact\": \"LogisticRegression\",\n \"description\": \"Logistic regression model version 2\",\n \"experimentRunId\": \"a8ea375c781d4b9c8e58469f0ad738f8\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"artifact\": \"LogisticRegression\",\n \"description\": \"Logistic regression model version 2\",\n \"experimentRunId\": \"a8ea375c781d4b9c8e58469f0ad738f8\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"artifact\": \"LogisticRegression\",\n \"description\": \"Logistic regression model version 2\",\n \"experimentRunId\": \"a8ea375c781d4b9c8e58469f0ad738f8\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2022-03-12T02:13:44.467Z",
"experimentRunId": "db79712b47084c27a463a188bf901943",
"modelName": "churn-prediction",
"modelVersion": 4,
"modelVersionDescription": "Customer churn model V1",
"ownerUsername": "martin_hito",
"project": {
"id": "62313ce67a0af0281c01a6a5",
"isGitBasedProject": true,
"name": "TO-DO",
"ownerUsername": "TO-DO"
},
"tags": {
"key": "value",
"key2": "anothervalue"
},
"updatedAt": "2022-03-12T02:13:44.467Z",
"versionUiDetails": {
"experimentRunInfo": {
"metrics": [
{
"key": "<string>",
"timestamp": "2022-03-12T02:13:44.467Z",
"value": 123
}
],
"params": [
{
"key": "<string>",
"value": "<string>"
}
],
"runUrl": "<string>"
},
"modelVersionDataSources": [
{
"dataSourceType": "<string>",
"id": "<string>",
"name": "<string>"
}
],
"modelVersionDatasets": [
{
"id": "<string>",
"name": "<string>",
"snapshotId": "<string>"
}
]
}
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Path Parameters
Registered model name
Body
Details of the model version to create
The artifact of the run to create the version from
"LogisticRegression"
The description of the registered model version
"Logistic regression model version 2"
The id of the experiment run to create the version from
"a8ea375c781d4b9c8e58469f0ad738f8"
Response
Success
When the latest version of the model was created
"2022-03-12T02:13:44.467Z"
The name of experiment run linked to the model version
"db79712b47084c27a463a188bf901943"
Name of the registered model
"churn-prediction"
The latest version of the model
4
Description of the model version
"Customer churn model V1"
username of the project owner
"martin_hito"
type that tracks properties of the project associated with a model
Show child attributes
Show child attributes
A map of key -> value
Show child attributes
Show child attributes
{ "key": "value", "key2": "anothervalue" }
When the latest version of the model was updated
"2022-03-12T02:13:44.467Z"
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"artifact": "LogisticRegression",
"description": "Logistic regression model version 2",
"experimentRunId": "a8ea375c781d4b9c8e58469f0ad738f8"
}
'import requests
url = "https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions"
payload = {
"artifact": "LogisticRegression",
"description": "Logistic regression model version 2",
"experimentRunId": "a8ea375c781d4b9c8e58469f0ad738f8"
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
artifact: 'LogisticRegression',
description: 'Logistic regression model version 2',
experimentRunId: 'a8ea375c781d4b9c8e58469f0ad738f8'
})
};
fetch('https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'artifact' => 'LogisticRegression',
'description' => 'Logistic regression model version 2',
'experimentRunId' => 'a8ea375c781d4b9c8e58469f0ad738f8'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions"
payload := strings.NewReader("{\n \"artifact\": \"LogisticRegression\",\n \"description\": \"Logistic regression model version 2\",\n \"experimentRunId\": \"a8ea375c781d4b9c8e58469f0ad738f8\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"artifact\": \"LogisticRegression\",\n \"description\": \"Logistic regression model version 2\",\n \"experimentRunId\": \"a8ea375c781d4b9c8e58469f0ad738f8\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/registeredmodels/v1/{modelName}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"artifact\": \"LogisticRegression\",\n \"description\": \"Logistic regression model version 2\",\n \"experimentRunId\": \"a8ea375c781d4b9c8e58469f0ad738f8\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2022-03-12T02:13:44.467Z",
"experimentRunId": "db79712b47084c27a463a188bf901943",
"modelName": "churn-prediction",
"modelVersion": 4,
"modelVersionDescription": "Customer churn model V1",
"ownerUsername": "martin_hito",
"project": {
"id": "62313ce67a0af0281c01a6a5",
"isGitBasedProject": true,
"name": "TO-DO",
"ownerUsername": "TO-DO"
},
"tags": {
"key": "value",
"key2": "anothervalue"
},
"updatedAt": "2022-03-12T02:13:44.467Z",
"versionUiDetails": {
"experimentRunInfo": {
"metrics": [
{
"key": "<string>",
"timestamp": "2022-03-12T02:13:44.467Z",
"value": 123
}
],
"params": [
{
"key": "<string>",
"value": "<string>"
}
],
"runUrl": "<string>"
},
"modelVersionDataSources": [
{
"dataSourceType": "<string>",
"id": "<string>",
"name": "<string>"
}
],
"modelVersionDatasets": [
{
"id": "<string>",
"name": "<string>",
"snapshotId": "<string>"
}
]
}
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"error": "<string>"
}